<template>
  <div>
    <div class="houseItem" v-for="item in list" :key="item.title">
      <div class="houseImg">
        <img :src="`http://liufusong.top:8080${item.houseImg}`" alt="" />
      </div>
      <div class="content">
        <h3 class="title">{{ item.title }}</h3>
        <div class="desc">{{ item.desc }}</div>
        <div>
          <span class="tag" v-for="i in item.tags" :key="i">{{ i }}</span>
        </div>
        <div class="price">
          <span class="priceNum">{{ item.price }}</span> 元/月
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      required: true
    }
  }
}
</script>

<style lang="less" scoped>
.houseItem {
  height: 120px;
  position: relative;
  box-sizing: border-box;
  justify-content: space-around;
  padding-top: 18px;
  border-bottom: 1px solid #e5e5e5;
  .houseImg {
    float: left;
    width: 106px;
    height: 80px;
    img {
      width: 106px;
      height: 80px;
    }
  }
  .content {
    overflow: hidden;
    line-height: 22px;
    padding-left: 12px;
    .title {
      margin: 0;
      font-size: 15px;
      color: #394043;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: middle;
    }
    .desc {
      font-size: 12px;
      color: #afb2b3;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: middle;
    }
    .tag {
      color: #39becd;
      background: #e1f5f8;
      display: inline-block;
      font-size: 12px;
      border-radius: 3px;
      padding: 4px 5px;
      margin-right: 5px;
      line-height: 12px;
    }
    .price {
      font-size: 12px;
      color: #fa5741;
      .priceNum {
        font-size: 16px;
        font-weight: bolder;
      }
    }
  }
}
</style>
